package com.lottery.dto;

import java.util.List;

public class ResultDto<T> {

	/**
	 * 判断操作是否成功
	 */
	private boolean success;
	
	/**
	 * 判断操作是否成功
	 */
	private int state;

	/**
	 * 提示信息
	 */
	private String message;

	/**
	 * 接收实体
	 */
	private T data;

	private Object data2;

	private Object data3;

	/**
	 * 接收list列表
	 */
	private List<?> list;

	/**
	 * 处理结果
	 */
	private int result;

	//其他参数
	private Object status;

	public Object getStatus() {
		return status;
	}

	public void setStatus(Object status) {
		this.status = status;
	}

	/**
	 * 无参构造
	 * 
	 * @return
	 */
	public ResultDto() {
		super();
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		if(success==true){
			this.state  = 0;
		}else{
			this.state  = 1;
		}
		this.success=success;
	}

	public int getState() {
		return state;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public List<?> getList() {
		return list;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public void setList(List<?> list) {
		this.list = list;
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	@Override
	public String toString() {

		return "[success:" + success + ", message:" + message + ", data:" + data + ", list:" + list + "]";
	}

	public void setResultData(boolean success,String message,Integer state,List list){
		this.success = success;
		this.message = message;
		this.list=list;
		this.state = state;
	}

	public Object getData2() {
		return data2;
	}

	public void setData2(Object data2) {
		this.data2 = data2;
	}

	public Object getData3() {
		return data3;
	}

	public void setData3(Object data3) {
		this.data3 = data3;
	}
}
